import { memo, ReactElement } from "react";
import type { FC } from "react";
import NavBar from "./navbar";
import Footer from "./footer";

interface IProps {
  children?: ReactElement;
}

const Layout: FC<IProps> = memo(function (props) {
  const { children } = props;
  return (
    <div>
      <NavBar />
      <div>{children}</div>
      <Footer />
    </div>
  );
});

export default Layout;
Layout.displayName = "Layout";
